﻿@model EmptoolWebApp.Models.CompanyViewModel

@{
    ViewBag.Title = "Add company";
}

@if ((TempData["ERROR_MESSAGE"] != null) && (!string.IsNullOrWhiteSpace(TempData["ERROR_MESSAGE"].ToString()))) {
    <div class="alert alert-danger alert-dismissible" role="alert"> 
    <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> 
    <strong>Error!</strong> @TempData["ERROR_MESSAGE"] </div>
}

<h2>@ViewBag.Title.</h2>

@using (Html.BeginForm("Create", "Company", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
{
    @Html.AntiForgeryToken()
    <h4>Create company record.</h4>
    <hr />
    @Html.ValidationSummary("", new { @class = "text-danger" })
    <div class="form-group">
        @Html.LabelFor(m => m.CompanyName, new { @class = "col-md-2 control-label" })
        <div class="col-md-10">
            @Html.TextBoxFor(m => m.CompanyName, new { @class = "form-control" })
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <input type="submit" class="btn btn-default" value="Register" />
        </div>
    </div>
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
